<?php

/**
 * Description of Provider
 *
 * @author polacseka
 */
abstract class UAL_Provider extends x10_Provider
{
	public $xName = 'Felhasználói-lekérés szolgáltató';

	protected $data;

	protected $dataClass = '';

	public function __construct(x10_Config $config=NULL)
	{
		parent::__construct($config);

		$this->data = new $this->dataClass();
	}

	public function get()
	{
		return $this->data;
	}

	public function asHash()
	{
		return md5((string)$this);
	}

	public function __toString()
	{
		$data = array(
			'part_scheme'	=> $this->data->scheme,
			'part_userinfo'	=> $this->data->userinfo,
			'part_host'		=> $this->data->host,
			'part_port'		=> $this->data->port,
			'part_path'		=> $this->data->path,
			'part_query'	=> $this->data->arguments
		);
		$url = new x10_Util_URL($data);
		return (string)$url;
	}
}

?>